package com.xyq.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResultCode {
    SUCCESS(1000 , "操作成功"),

    ERROR (2000 , "服务器繁忙,请稍后再试"), // 服务器出现异常时,怎么操作 ;

//  服务器没有出现异常,但操作失败
    FAILED(3000 , "操作失败"),
    FAILED_UNAUTHORIZED(3001 , "未授权" ),
    FAILED_PARAMS_VALIDATE(3002 , "参数校验失败"),
    FAILED_NOT_EXISTS(3003,"资源不存在"),
    FAILED_ALREADY_EXISTS(3004 , "资源已存在"),

    FAILED_USER_EXISTS(3101 , "用户已存在"),
    FAILED_USER_NOT_EXISTS(3102 , "用户不存在"),
    FAILED_LOGIN(3103 , "用户名或密码错误"),
    FAILED_USER_BANNED(3104, "您已经被列入黑名单, 请联系管理员"),
    FAILED_PASSWORD_DIFFERENT(3105,"两次输入的密码不同"),

    EXAM_START_TIME_ERROR(3201 , "竞赛的开始时间不能早于当前时间"),
    EXAM_END_TIME_ERROR(3202 , "竞赛的结束时间, 不能早于竞赛开始时间"),
    EXAM_NOT_EXISTS(3203, "竞赛不存在"),
    QUESTION_NOT_EXISTS (3204 , "添加的题目不存在"),
    QUESTIONS_NOT_EXISTS(3205 , "没有给竞赛添加题目"),
    EXAM_QUESTION_ALREADY_EXISTS(3206, "题目已经在竞赛中"),
    EXAM_IS_FINISH(3207 , "竞赛已经结束"),
    EXAM_IS_START(3208 , "竞赛已经开始"),
    USER_EXAM_IS_ENTER(3209 , "已经报名当前竞赛,请不要重复报名"),
    EXAM_IS_PUBLISH(3210 , "竞赛已经发布,不允许修改"),


    FAILED_FILE_UPLOAD(3301 , "文件上传失败"),
    FAILED_FILE_UPLOAD_TIME_LIMIT(3302 , "今日头像上传次数以达上限"),
    FAILED_FILE_TOO_BIG(3303 , "上传的文件过大,请换一个"),

    FAILED_FIRST_QUESTION(3401 , "当前题目已经是第一题了"),
    FAILED_LAST_QUESTION(3402 , "当前题目已经是最后一题了"),

    FAILED_NOT_SUPPORT_PROGRAM(3501 , "目前不支持该语言类型"),

    FAILED_RABBIT_PRODUCE(3601 , "mq生产消息异常"),
    MESSAGE_NOT_EXISTS(3602 , "消息已不存在") ;


    public int code ;
    public String message ;
}
